<template>
  <div>
    <div class="title">
      <el-row>
        <el-col :span="1" style="width: 50px;">
          <span style="color:#757575;">位置 :</span>
        </el-col>
        <el-col :span="20">
          <span @click="tableshow" class="hand" :class="{'text' : !secondshow}">简历反馈</span>
          <span v-if="secondshow" :class="{'text' : secondshow}">> {{secondtitle}}</span>
        </el-col>
      </el-row>
    </div>
    <div class="posttable" v-show="!addShow">
      <el-row type="flex" justify="center">
        <el-col :span="23">
          <div style="float: left;" class="tabletitle">
            <el-radio v-model="radio" @change="radioChange" label="未反馈">未反馈</el-radio>
            <el-radio v-model="radio" @change="radioChange" label="已反馈">已反馈</el-radio>
            <el-radio v-model="radio" @change="radioChange" label="未通过简历">未通过简历</el-radio>
            <el-radio v-model="radio" @change="radioChange" label="通过简历">通过简历</el-radio>
            <el-radio v-model="radio" @change="radioChange" label="需求关闭">需求关闭</el-radio>
          </div>
          <div style="margin-bottom:20px;float: right;">
            <el-row type="flex" justify="space-between" style="margin-top: 11px;" class="btn">
              <el-input
                style="width: 136px;"
                size="small"
                placeholder="查找"
                v-model.trim="inputValue"
                @keydown.enter.native="searchMsg"
              >
                <i
                  slot="suffix"
                  class="el-input__icon el-icon-search"
                  style="cursor: pointer;"
                  @click="searchMsg"
                ></i>
              </el-input>
              <el-button
                style="margin-left: 5px;"
                v-if="zhuliUnfeedback"
                class="back"
                size="small"
                round
                @click="backClick"
              >回复</el-button>
              <el-button
                style="margin-left: 5px;"
                v-if="zhuliUnfeedback"
                class="giveUp"
                size="small"
                round
                @click="giveUpClick"
              >放弃面试</el-button>
            </el-row>
          </div>
        </el-col>
      </el-row>
      <el-row type="flex" justify="center">
        <el-col :span="23">
          <el-table
            class="resutable"
            :data="tableData"
            highlight-current-row
            @current-change="handleCurrentChange"
            @row-click="getRowKey"
            @expand-change="postCheck"
            ref="multipleTable"
          >
            <el-table-column label="推送客户" width="120">
              <template slot-scope="scope">
                <!-- prop="name" -->
                <span style="cursor: pointer; color:#1198ff;" @click="viewdetail(scope.row)">
                  {{scope.row.customerName}}
                  <span v-if="scope.row.type">({{scope.row.type}})</span>
                </span>
              </template>
            </el-table-column>
            <el-table-column label="需求编号" width="140">
              <template slot-scope="scope">
                <!-- prop="name" -->
                <span
                  style="cursor: pointer; color:#1198ff;"
                  @click="viewjobdemand(scope.row)"
                >{{scope.row.requireNum}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="postName" label="推送职位"></el-table-column>
            <el-table-column prop="postLevel" label="职位级别"></el-table-column>
            <el-table-column prop="area" label="所属区域"></el-table-column>
            <el-table-column label="姓名">
              <template slot-scope="scope">
                <!-- prop="name" -->
                <span>
                  <a
                    :href="scope.row.group+'/'+scope.row.fileAddress"
                    class="resumeLink"
                    target="_blank"
                  >{{scope.row.name}}</a>
                </span>
              </template>
            </el-table-column>
            <el-table-column label="毕业时间">
              <template slot-scope="scope">
                <span>{{scope.row.graduationTime | converTime("YYYY-MM")}}</span>
              </template>
            </el-table-column>
            <el-table-column label="出生年月">
              <template slot-scope="scope">
                <span>{{scope.row.birthday | converTime("YYYY-MM")}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="phone" label="联系方式"></el-table-column>
            <el-table-column prop="status" label="离职状态"></el-table-column>
            <el-table-column label="期望薪资">
              <template slot-scope="scope">
                <span>{{scope.row.expectSalary}}k*{{scope.row.expectSalaryNum}}</span>
              </template>
            </el-table-column>
            <el-table-column label="到岗时间">
              <template slot-scope="scope">
                <span>{{scope.row.entryTime}}</span>
              </template>
            </el-table-column>
            <el-table-column label="推送时间">
              <template slot-scope="scope">
                <span>{{scope.row.pushTime | converTime("YYYY-MM-DD")}}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="initialEvaluation"
              label="初步评价"
              v-if="iszhuli"
              width="300"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column label="是否已读" v-if="checked">
              <template slot-scope="scope">
                <div v-if="scope.row.prRead == 'Y'">
                  <i class="el-icon-check"></i>
                </div>
              </template>
            </el-table-column>
            <el-table-column type="expand" label="功能区" width="80" v-if="unfeedback" :key="1">
              <template slot-scope="props">
                <div style="text-align:left;margin-left:10px;font-size:14px;line-height:20px;">
                  <p style="color: #fe423e;">简历反馈</p>
                  <p>
                    {{props.row.assistantRemarks}}
                    <span>{{props.row.assTime | converTime("YYYY-MM-DD HH:mm")}}</span>
                  </p>
                </div>
              </template>
            </el-table-column>
          </el-table>
          <div class="pager">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="pagehandleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[5,10,15]"
              :page-size="pagesize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="totalcount"
            ></el-pagination>
            <el-dialog
              class="addP"
              title="回复"
              :visible.sync="feedBackSecVisible"
              width="415px"
              :before-close="cancelsecBack"
            >
              <el-form :model="formL" :rules="rules" ref="formL" label-position="top">
                <el-form-item
                  label="回复面试时间"
                  :label-width="formLabelWidth"
                  prop="time"
                  v-if="timeBool"
                >
                  <el-date-picker
                    v-model="formL.time"
                    type="datetime"
                    value-format="yyyy-MM-dd HH:mm"
                    format="yyyy-MM-dd HH:mm"
                    placeholder="选择面试时间"
                  ></el-date-picker>
                </el-form-item>
                <el-form-item label="候选人情况" :label-width="formLabelWidth" prop="type">
                  <el-select v-model="formL.type" @change="seltype">
                    <el-option
                      v-for="(item,index) in typelist"
                      :key="index"
                      :label="item"
                      :value="item"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="备注" prop="reasonsec">
                  <el-input
                    type="textarea"
                    :autosize="{minRows:2}"
                    v-model.trim="formL.reasonsec"
                    placeholder="某某某什么时间适合面试"
                  ></el-input>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button
                  class="sure"
                  :disabled="backsedis"
                  type="primary"
                  round
                  @click="backsecConfirm('formL')"
                >
                  确
                  定
                </el-button>
                <el-button class="cancel" round @click="cancelsecBack">取 消</el-button>
              </div>
            </el-dialog>
            <el-dialog
              class="addP"
              title="放弃面试"
              :visible.sync="giveUpVisible"
              width="415px"
              :before-close="cancelGiveUp"
            >
              <el-form :model="formL" ref="formL" label-position="top">
                <el-form-item label="放弃面试理由" :label-width="formLabelWidth">
                  <el-input v-model="giveUpReason" placeholder="请输入放弃面试理由"></el-input>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button
                  class="sure"
                  :disabled="backsedis"
                  type="primary"
                  round
                  @click="giveUpConfirm"
                >确 定</el-button>
                <el-button class="cancel" round @click="cancelGiveUp">取 消</el-button>
              </div>
            </el-dialog>
            <el-dialog
              title="错误"
              :visible.sync="editdialogVisible"
              width="30%"
              :before-close="handleClose"
              class="deletedialog"
            >
              <div style="text-align: center">
                <i class="el-icon-warning" style="font-size: 20px;color: #fcb543;">
                  <span style="font-size: 16px;color: #333;margin-left: 12px;">尚未选择任何简历</span>
                </i>
              </div>
              <span slot="footer" class="dialog-footer">
                <el-button class="sure" round @click="handleOpen">确 定</el-button>
                <el-button round @click="handleClose" class="cancel">取 消</el-button>
              </span>
            </el-dialog>
          </div>
        </el-col>
      </el-row>
    </div>
    <div v-if="type == 2">
      <job-Detail v-show="addShow" :detail-no="detailno"></job-Detail>
    </div>
    <div v-if="type == 3">
      <upload-Detail v-show="addShow" :detail-code="detailcode"></upload-Detail>
    </div>
  </div>
</template>
<script>
import axios from "axios";
import JobDetail from "../resumeupload/jobdetail.vue";
import UploadDetail from "../resumeupload/uploaddetail.vue";

export default {
  data() {
    return {
      giveUpReason: "",
      inputValue: "",
      secondshow: false,
      editdialogVisible: false,
      giveUpVisible: false,
      radio: "未反馈",
      formL: {
        time: null,
        type: "",
        reasonsec: ""
      },
      typelist: ["待定", "正常", "未联系"],
      zhuliUnfeedback: false, //控制回复按钮显示隐藏的
      unfeedback: false,
      tableData: [],
      currentPage: 1,
      rowChecked: false,
      pagesize: 15,
      totalcount: 0,
      checked: false,
      timeBool: false,
      type: null,
      secondtitle: "",
      addShow: false,
      rowId: "",
      currentRow: null,
      iszhuli: true,
      feedBackVisible: false,
      feedBackSecVisible: false,
      formLabelWidth: "120px",
      backsedis: false,
      rules: {
        time: [
          { required: true, message: "请选择面试时间", trigger: "change" }
        ],
        type: [
          { required: true, message: "请选择候选人状态", trigger: "change" }
        ]
      }
    };
  },
  created() {
    this.success();
    this.$bus.$on("notify1", () => {
      this.notify();
    });
    this.$bus.$on("notify2", () => {
      this.notify1();
    });
  },
  methods: {
    notify() {
      this.radio = "已反馈";
      axios
        .post(this.url + "/feed/zlmfeedbackalready", {
          condition: this.inputValue,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            if (res.data.data !== null) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          }
        });
    },
    notify1() {
      this.radio = "未通过简历";
      this.feedbackalreadyno();
    },
    success() {
      this.tableData = [];
      axios
        .post(this.url + "/feed/zlmnofeedback", {
          condition: this.inputValue,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            if (res.data.data !== null) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          }
        });
    },
    feedbackalreadyno() {
      this.tableData = [];
      axios
        .post(this.url + "/feed/feedbackalreadyno", {
          condition: this.inputValue,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            if (res.data.data !== null) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          }
        });
    },
    //通过简历
    getResumePass() {
      this.tableData = [];
      axios
        .post(this.url + "/feed/getResumePass", {
          condition: this.inputValue,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            if (res.data.data !== null) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          }
        });
    },
    //需求关闭
    getDemandClose() {
      this.tableData = [];
      axios
        .post(this.url + "/feed/getDemandClose", {
          condition: this.inputValue,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            if (res.data.data !== null) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          }
        });
    },
    searchMsg() {
      this.currentPage = 1;
      if (this.radio == "未反馈") {
        axios
          .post(this.url + "/feed/zlmnofeedback", {
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            }
          });
      } else if (this.radio == "已反馈") {
        axios
          .post(this.url + "/feed/zlmfeedbackalready", {
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            }
          });
      } else if (this.radio == "未通过简历") {
        this.feedbackalreadyno();
      } else if (this.radio == "通过简历") {
        this.getResumePass();
      } else if (this.radio == "需求关闭") {
        this.getDemandClose();
      }
    },
    tableshow(row) {
      this.addShow = false;
      this.secondshow = false;
      this.$refs.multipleTable.setCurrentRow(row);
      this.type = null;
      this.typechange();
    },
    backClick() {
      if (this.currentRow == null) {
        this.editdialogVisible = true;
        document.documentElement.style.overflow = "hidden";
      } else if (this.currentRow !== null) {
        this.editdialogVisible = false;
        this.feedBackSecVisible = true;
        this.timeBool = false;
        document.documentElement.style.overflow = "hidden";
      }
    },
    handleOpen() {
      this.editdialogVisible = false;
      document.documentElement.style.overflow = "auto";
    },
    handleClose() {
      this.editdialogVisible = false;
      document.documentElement.style.overflow = "auto";
    },
    viewdetail(val) {
      this.detailcode = val;
      this.addShow = !this.addShow;
      this.secondtitle = "查看上传内容";
      this.secondshow = !this.secondshow;
      this.type = 3;
    },
    viewjobdemand(val) {
      this.detailno = val.requireNum;
      this.addShow = !this.addShow;
      this.secondtitle = "职位需求";
      this.secondshow = true;
      this.type = 2;
    },
    getRowKey(row) {
      this.rowId = row.id;
      this.rowChecked = true;
      this.pusher = row.mailsender;
    },
    handleSizeChange(val) {
      this.pagesize = val;
      this.typechange();
    },
    handleCurrentChange(val) {
      this.currentRow = val;
    },
    pagehandleCurrentChange(val) {
      this.currentPage = val;
      this.typechange();
    },
    //单选框变化
    radioChange(val) {
      this.currentPage = 1;
      if (val == "未反馈") {
        this.inputValue = "";
        this.checked = false;
        this.unfeedback = false;
        this.iszhuli = true;
        this.zhuliUnfeedback = false;
        this.success();
      } else if (val == "已反馈") {
        this.inputValue = "";
        this.zhuliUnfeedback = true;
        this.checked = true;
        this.unfeedback = true;
        this.tableData = [];
        axios
          .post(this.url + "/feed/zlmfeedbackalready", {
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          });
      } else if (val == "未通过简历") {
        this.inputValue = "";
        this.zhuliUnfeedback = false;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.feedbackalreadyno();
      } else if (val == "通过简历") {
        this.inputValue = "";
        this.zhuliUnfeedback = true;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.getResumePass();
      } else if (val == "需求关闭") {
        this.inputValue = "";
        this.zhuliUnfeedback = false;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.getDemandClose();
      }
    },
    typechange() {
      if (this.radio == "未反馈") {
        this.zhuliUnfeedback = false;
        this.checked = false;
        this.unfeedback = false;
        this.iszhuli = true;
        this.tableData = [];
        this.success();
      } else if (this.radio == "已反馈") {
        this.zhuliUnfeedback = true;
        this.checked = true;
        this.unfeedback = true;
        this.tableData = [];
        axios
          .post(this.url + "/feed/zlmfeedbackalready", {
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          });
      } else if (val == "未通过简历") {
        this.zhuliUnfeedback = false;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.feedbackalreadyno();
      } else if (val == "通过简历") {
        this.inputValue = "";
        this.zhuliUnfeedback = true;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.getResumePass();
      } else if (val == "需求关闭") {
        this.inputValue = "";
        this.zhuliUnfeedback = false;
        this.iszhuli = false;
        this.checked = false;
        this.unfeedback = true;
        this.getDemandClose();
      }
    },
    // 已读状态请求
    postCheck(val, rows) {
      if (this.radio == "已反馈") {
        axios
          .post(this.url + "/feed/zlmreed", {
            id: val.id
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
            }
          });
      }
      if (rows.length == 0) {
        if (this.radio == "已反馈") {
          axios
            .post(this.url + "/feed/zlmfeedbackalready", {
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            });
        }
      }
    },
    //回复
    backsecConfirm(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          this.backsedis = true;
          if (this.formL.time == "") {
            this.formL.time = null;
          }
          if (!this.timeBool) {
            this.currentPage = 1;
            axios
              .post(this.url + "/feed/zlmfeedback", {
                id: this.rowId,
                resumeState: "AK",
                comTime: this.formL.time,
                type: this.formL.type,
                interviewTimeok: this.formL.reasonsec,
                mailsender: this.pusher
              })
              .then(res => {
                this.unlogin(res.data.code);
                if (res.data.code == 200) {
                  this.backsedis = false;
                  this.feedBackSecVisible = false;
                  document.documentElement.style.overflow = "auto";
                  if (this.radio == "已反馈") {
                    axios
                      .post(this.url + "/feed/zlmfeedbackalready", {
                        condition: "",
                        pageNum: this.currentPage,
                        pageSize: this.pagesize
                      })
                      .then(res => {
                        this.unlogin(res.data.code);
                        if (res.data.code == 200) {
                          this.tableData = res.data.data.list;
                          this.totalcount = res.data.data.total;
                          this.timeBool = false;
                        }
                      });
                  } else if (this.radio == "通过简历") {
                    axios
                      .post(this.url + "/feed/getResumePass", {
                        condition: "",
                        pageNum: this.currentPage,
                        pageSize: this.pagesize
                      })
                      .then(res => {
                        this.unlogin(res.data.code);
                        if (res.data.code == 200) {
                          this.tableData = res.data.data.list;
                          this.totalcount = res.data.data.total;
                          this.timeBool = false;
                        }
                      });
                  }

                  this.$refs.formL.resetFields();
                }
              });
          } else {
            this.currentPage = 1;
            axios
              .post(this.url + "/feed/zlmfeedback", {
                id: this.rowId,
                resumeState: "AK",
                comTime: this.formL.time,
                type: "",
                interviewTimeok: this.formL.reasonsec,
                mailsender: this.pusher
              })
              .then(res => {
                this.unlogin(res.data.code);
                if (res.data.code == 200) {
                  this.backsedis = false;
                  this.feedBackSecVisible = false;
                  document.documentElement.style.overflow = "auto";
                  if (this.radio == "已反馈") {
                    axios
                      .post(this.url + "/feed/zlmfeedbackalready", {
                        condition: "",
                        pageNum: this.currentPage,
                        pageSize: this.pagesize
                      })
                      .then(res => {
                        this.unlogin(res.data.code);
                        if (res.data.code == 200) {
                          this.tableData = res.data.data.list;
                          this.totalcount = res.data.data.total;
                          this.timeBool = false;
                        }
                      });
                  } else if (this.radio == "通过简历") {
                    axios
                      .post(this.url + "/feed/getResumePass", {
                        condition: "",
                        pageNum: this.currentPage,
                        pageSize: this.pagesize
                      })
                      .then(res => {
                        this.unlogin(res.data.code);
                        if (res.data.code == 200) {
                          this.tableData = res.data.data.list;
                          this.totalcount = res.data.data.total;
                          this.timeBool = false;
                        }
                      });
                  }
                  this.$refs.formL.resetFields();
                }
              });
          }
        }
      });
    },
    cancelsecBack() {
      this.backsedis = false;
      this.$refs.formL.resetFields();
      this.feedBackSecVisible = false;
      document.documentElement.style.overflow = "auto";
    },
    giveUpClick() {
      if (this.currentRow == null) {
        this.editdialogVisible = true;
        document.documentElement.style.overflow = "hidden";
      } else {
        this.giveUpVisible = true;
        document.documentElement.style.overflow = "hidden";
        this.giveUpReason = "";
      }
    },
    giveUpConfirm() {
      axios
        .post(this.url + "/feed/giveupinterview", {
          id: this.currentRow.id,
          resumeState: "AK",
          interviewTimeok: this.giveUpReason,
          mailsender: this.pusher
        })
        .then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            this.giveUpVisible = false;
            document.documentElement.style.overflow = "auto";
            this.$refs.multipleTable.setCurrentRow();
            this.currentPage = 1;
            if (this.radio == "已反馈") {
              axios
                .post(this.url + "/feed/zlmfeedbackalready", {
                  condition: "",
                  pageNum: this.currentPage,
                  pageSize: this.pagesize
                })
                .then(res => {
                  this.unlogin(res.data.code);
                  if (res.data.code == 200) {
                    this.tableData = res.data.data.list;
                    this.totalcount = res.data.data.total;
                    this.timeBool = false;
                  }
                });
            } else if (this.radio == "通过简历") {
              axios
                      .post(this.url + "/feed/getResumePass", {
                        condition: "",
                        pageNum: this.currentPage,
                        pageSize: this.pagesize
                      })
                      .then(res => {
                        this.unlogin(res.data.code);
                        if (res.data.code == 200) {
                          this.tableData = res.data.data.list;
                          this.totalcount = res.data.data.total;
                          this.timeBool = false;
                        }
                      });
            }
          }
        });
    },
    cancelGiveUp() {
      this.giveUpReason = "";
      this.giveUpVisible = false;
      document.documentElement.style.overflow = "auto";
      this.$refs.multipleTable.setCurrentRow();
    },
    seltype() {
      if (this.formL.type == "正常") {
        this.formL.time = null;
        axios
          .post(this.url + "/feed/comtime", {
            id: this.currentRow.id
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200 && res.data.data == "1") {
              this.timeBool = true;
            } else {
              this.timeBool = false;
            }
          });
      } else {
        this.formL.time = null;
        this.timeBool = false;
      }
    }
  },
  components: {
    JobDetail,
    UploadDetail
  },
  beforeDestroy() {
    this.$bus.$off("notify1");
    this.$bus.$off("notify2");
  },
  watch: {
    inputValue: function(val) {
      this.currentPage = 1;
      if (val == "") {
        if (this.radio == "未反馈") {
          this.success();
        } else if (this.radio == "已反馈") {
          axios
            .post(this.url + "/feed/zlmfeedbackalready", {
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            });
        } else if (this.radio == "未通过简历") {
          this.feedbackalreadyno();
        } else if (this.radio == "通过简历") {
          this.getResumePass();
        } else if (this.radio == "需求关闭") {
          this.getDemandClose();
        }
      }
    }
  }
};
</script>
<style scoped>
.title {
  background-color: #fff;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
  padding-left: 20px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.text {
  color: #1099ff;
}

.posttable {
  min-height: 700px;
  background-color: #fff;
}

.tabletitle {
  margin-left: 20px;
  height: 50px;
  line-height: 50px;
}

.back {
  width: 65px;
  height: 28px;
  opacity: 0.86;
  color: #fff;
  background: linear-gradient(to bottom, #6a76c7 0%, #8995e8 100%);
  padding: 7px 15px !important;
}

.back:hover {
  color: #fff !important;
}

.back:focus {
  color: #fff !important;
}

.giveUp {
  width: 76px;
  height: 28px;
  opacity: 0.86;
  color: #fff;
  background: linear-gradient(to bottom, #ffbc1c 0%, #f69710 100%);
  padding: 7px 15px !important;
}

.giveUp:hover {
  color: #fff !important;
}

.giveUp:focus {
  color: #fff !important;
}

.resutable {
  background-color: #fff;
}

.pager {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
  margin-bottom: 10px;
}

.el-pagination {
  margin-left: 50%;
  transform: translateX(-50%);
}

.resumeLink {
  cursor: pointer;
  color: #1198ff;
  text-decoration: none;
}
</style>
